<?php
namespace app\home\controller;

use app\home\model\IndexRecommend;
use app\home\model\Recommend;

class Index
{
    public function index()
    {

        //获取搜索关键字
        $yuansuKeyWordList = Recommend::getKeywordList(2,6);
        $beijingKeyWordList = Recommend::getKeywordList(3,6);
        $mobanKeyWordList = Recommend::getKeywordList(4,6);

        //获取元素推荐
        $yuansuList = IndexRecommend::getYuansuIndexList();


        return view('index',
            [
                'yuansuKeyWordList'=>$yuansuKeyWordList,
                'beijingKeyWordList'=>$beijingKeyWordList,
                'mobanKeyWordList'=>$mobanKeyWordList,
                'yuansuList'=>$yuansuList,
            ]
        );
    }

}
